import { formatTime } from '@/utils'
import i18n from '@/locales/index'
const { t } = i18n.global

export const hangersDataColumns = [
  { title: t('other.HangerNo'), dataIndex: 'hangerNo', key: 'hangerNo', align: 'center', width: 120 , resizable: true},
  { title: t('hangManage.makeNo'), dataIndex: 'moNo', key: 'moNo', align: 'center', width: 120, resizable: true },
  { title: t('basicData.styleNo'), dataIndex: 'styleNo', key: 'styleNo', align: 'center', width: 120 , resizable: true},
  { title: t('basicData.color'), dataIndex: 'color', key: 'color', align: 'center', width: 120 , resizable: true},
  { title: t('basicData.size'), dataIndex: 'size', key: 'size', align: 'center', width: 120 , resizable: true},
  { title: t('common.unit'), dataIndex: 'unit', key: 'unit', align: 'center', width: 120 , resizable: true},
  { title: t('hangManage.po'), dataIndex: 'poNo', key: 'poNo', align: 'center', width: 120 , resizable: true},
  { title: t('hangManage.bedNo'), dataIndex: 'cutterNo', key: 'cutterNo', align: 'center', width: 100 , resizable: true},
  { title: t('hangManage.cut'), dataIndex: 'tailorBill', key: 'tailorBill', align: 'center', width: 100 , resizable: true},
  { title: t('other.currentSit'), dataIndex: 'currentStation', key: 'currentStation', align: 'center', width: 120 , resizable: true},
  { title: t('hangManage.nextStation'), dataIndex: 'nextStation', key: 'nextStation', align: 'center', width: 120 , resizable: true},
  { title: t('hangManage.road'), dataIndex: 'roadmap', key: 'roadmap', align: 'center', width: 120 , resizable: true},
  { title: t('common.completeState'), dataIndex: 'status', key: 'status', align: 'center', width: 120 , resizable: true}
]

export const hangerDetailsColumns = [
  { title: t('basicData.processNo'), dataIndex: 'processNo', key: 'processNo', align: 'center', width: 80 , resizable: true},
  { title: t('hangManage.stationNo'), dataIndex: 'stationNo', key: 'stationNo', align: 'center', width: 80 , resizable: true},
  { title: t('basicData.staffName'), dataIndex: 'staffName', key: 'staffName', align: 'center', width: 80 , resizable: true},
  { title: t('basicData.processCodes'), dataIndex: 'processCode', key: 'processCode', align: 'center', width: 120 , resizable: true},
  { title: t('basicData.processNames'), dataIndex: 'processName', key: 'processName', align: 'center', width: 120 , resizable: true},
  { title: t('hangManage.intoStationTime'), dataIndex: 'pullInTime', key: 'pullInTime', align: 'center', width: 170 , resizable: true, timeType: 'time',
    customRender: ({ text }) => {
      return formatTime(text, 'YYYY-MM-DD HH:mm:ss:SSS')
    }
  },
  { title: t('hangManage.leaveStationTime'), dataIndex: 'leaveTime', key: 'leaveTime', align: 'center', width: 170 , resizable: true, timeType: 'time',
    customRender: ({ text }) => {
      return formatTime(text, 'YYYY-MM-DD HH:mm:ss:SSS')
    }
  },
  { title: t('common.remark'), dataIndex: 'remark', key: 'remark', align: 'center', resizable: true, width: 120 },

]